/*
*	@author yourname
*	@email 
*	@qq 
*   @lastdate 
*   插件功能 描述，代码结构要求
*/

;(function ($) {
  var pluginName = 'upload',  //定义插件名

  	  //插件的参数默认值
      defaults = {
					ebtn:"#doc",
					eimg:"#preview",
					ediv:"#localImag"
      };

  //... 插件主体功能代码 ...
  $.fn[ pluginName ] = function (options) {
	  
	  var settings = $.extend({}, defaults, options);//将参数值合并到默认值
	  
	  //主体代码开始
	  	var imgObjPreview = $(settings.eimg);
			var docObj =$(settings.ebtn);
			var $bg= document.getElementById("bg");
			imgObjPreview.css({"display":"block","width":"134px","height":"134px"});
			imgObjPreview.attr("src",window.URL.createObjectURL(docObj[0].files[0]));
			return true;
  }

})(jQuery);



